import skRequest from '../request'

// 获取用户列表
export function postUsersListData(data: any) {
  return skRequest.post({
    url: '/users/list',
    data
  })
}

// 根据id删除用户
export function deleteUserById(id: number) {
  return skRequest.delete({
    url: `/users/${id}`
  })
}

// 新建用户
export function createUserData(userInfo: any) {
  return skRequest.post({
    url: '/users',
    data: userInfo
  })
}

// 编辑用户
export function editUserData(id: number, userInfo: any) {
  return skRequest.patch({
    url: `/users/${id}`,
    data: userInfo
  })
}
